<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人中心</title>
<link type="text/css" rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/css.css"/>
<link type="text/css" rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/global.css"/>
<link rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/powerFloat.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="<?php echo $this->_var['js_path']; ?>/jnotify/jNotify.jquery.css" />
</head>
<body>
<?php echo $this->fetch('header.html'); ?>
<div id="wrapper">
  <div id="content">
    <div id="con_le"> <?php echo $this->fetch('user_nav.html'); ?> 
    </div>
    
    <div id="con_box">
      <div class="Current"><?php echo $this->_var['position']; ?></div>
      <div class="con_top"> <?php echo $this->fetch('user_common_detail.html'); ?>
        <div class="clear"></div>
      </div>
      <div id="user_content"> <?php echo $this->fetch('message.html'); ?>
        <div id="message_action"> <a href="<?php echo $this->_var['site_url']; ?>user/collect/list">全部</a> <a href="<?php echo $this->_var['site_url']; ?>user/collect/list/goods">产品收藏</a> <a href="<?php echo $this->_var['site_url']; ?>user/collect/list/store" >店铺收藏</a> <a href="<?php echo $this->_var['site_url']; ?>user/collect/list/news" >新闻收藏</a> <a href="<?php echo $this->_var['site_url']; ?>user/collect/list/trade" >供求收藏</a> </div>
      
      
      
      <?php if (! empty ( $this->_var['collect_list'] )): ?>
        <table width="100%" cellspacing="0" cellpadding="0" class="tableStatic">
          <thead>
            <tr>
              <td width="40%">标题</td>
              <td width="20%">类型</td>
              <td width="10%">链接</td>
              <td width="20%">时间</td>
              <td width="10%">操作</td>
            </tr>
          </thead>
          <tbody>
          
          <?php $_from = $this->_var['collect_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['list']):
?>
          <tr id="tr_collect_<?php echo $this->_var['list']['id']; ?>">
            <td><?php echo $this->_var['list']['title']; ?></td>
            <td align="center"><?php echo __($this->_var['list']['type']); ?></td>
            <td align="center"><a href="<?php echo $this->_var['list']['url']; ?>" target="_blank">点击查看</a></td>
            <td><?php echo Date::timeformat($this->_var['list']['add_time'],3); ?></td>
            <td align="center"><a href="javascript:viod(0);" class="delete" id="<?php echo $this->_var['list']['id']; ?>" title="<?php echo $this->_var['list']['title']; ?>">删除</a>
              <p class="msg_<?php echo $this->_var['list']['id']; ?>" style="color:red"></p></td>
          </tr>
          <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
            </tbody>
          
          <?php if (! empty ( $this->_var['page'] )): ?>
          <tfoot>
            <tr>
              <td colspan="5" align="center"><?php echo $this->_var['page']; ?></td>
            </tr>
          </tfoot>
          <?php endif; ?>
        </table>
            <?php else: ?>
        <h1 style="color:#CCC;text-align:center;margin-top:60px;">暂无</h1>
        <?php endif; ?>
        <div class="clear"></div>
      </div>
    </div>
    
    <div class="clear"></div>
  </div>
   
</div>
<?php echo $this->fetch('footer.html'); ?>
<?php echo $this->fetch('hidden_div.html'); ?> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery-powerFloat.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery.pngfix.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/scrolltopcontrol.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/myfloat.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/lhgdialog/lhgcore.lhgdialog.min.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jnotify/jNotify.jquery.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery.validate.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/message.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/common.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/user.js"></script> 
<script>
$(function(){
	
	//发送和接受的当前状态
	$('#message_action a').each(function(){
		if($(this).attr('href') == window.location.pathname){
			  $(this).attr('class','current');
		}
	});
	
	$('.delete').click(function(){
		var title = $(this).attr('title');
		var id = $(this).attr('id');
		$.dialog.confirm('你确定要删除<font color=red>'+title+'</font>吗？', function(){
		     var args = "id="+id;
             ajax_post("<?php echo $this->_var['site_url']; ?>user/ajax/delete_collect",args,'text',function(data){
				 if(data == 'success'){
				   jSuccess("恭喜，操作成功!",{
					   VerticalPosition : 'center',
				       HorizontalPosition : 'center'
				   });
				   $('#tr_collect_'+id).fadeOut();
				 }
		     });
		}, 
		function(){
			
	    });
	});
})

</script>
</body>
</html>
